package com.finance.view;

import java.io.Serializable;
import java.util.List;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import com.finance.model.UserAccount;
import com.finance.services.IUserAccountService;
import java.util.ArrayList;
import org.springframework.beans.factory.annotation.Autowired;

/**
 *
 * @author Visual556
 */
@Controller
@Scope(value = "request")
public class AdministrationPage implements Serializable {

    @Autowired
    private IUserAccountService userAccountService;

    public AdministrationPage() {
    }

    public List<UserAccount> getUsers() {
        try {
            return userAccountService.loadAllUsers();
        } catch (Exception ex) {
            return new ArrayList<>();
        }
    }

}
